#ifndef PREVIEWDIALOG_H
#define PREVIEWDIALOG_H

#include <QDialog>
#include <QImage>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QFileDialog>
#include <QImageReader>
#include <QTextDocument>
#include <QLabel>
#include <QTextEdit>
#include <QPushButton>
#include <QComboBox>
#include "component/item/BlogItemWidget.h"

class PreviewDialog : public QDialog
{
    Q_OBJECT
public:
    explicit PreviewDialog(const QString &title, const QString &summary, QWidget *parent = nullptr);
    QImage getCoverImage() const;
    QString getSelectedTag() const;

private slots:
    void selectCoverImage();

private:
    QTextEdit *previewEditor;
    QPushButton *selectImageButton;
    QPushButton *confirmButton;
    QComboBox *tagComboBox;
    QImage coverImage;
    BlogItemWidget *blogItem;

signals:
};

#endif // PREVIEWDIALOG_H
